package com.hdax.dm.api.scheduler;

import com.hdax.dm.entity.scheduler.OrderScheduler;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@RestController
@Api(tags = "商品排期模块")
public interface OrderSchedulerControllerApi {

    @PostMapping(path = "/scheduler/price")
    @ApiOperation(value = "座位价格",notes = "座位价格查询")
    @ApiImplicitParam(required = true,name = "itemId")
    OrderScheduler price(@RequestParam("x")Long x, @RequestParam("y")Long y, @RequestParam("scheduleId")Long scheduleId);

    @PostMapping(path = "/scheduler/updateSeatState")
    @ApiOperation(value = "排期座位",notes = "排期座位状态修改")
    boolean updateSeatState(@RequestParam("orderNo")String orderNo, @RequestParam("userId")Long userId, @RequestParam("id")Long id);

    @PostMapping(path = "/scheduler/updateSeatState3")
    @ApiOperation(value = "排期座位",notes = "排期座位状态修改为已购买")
    boolean updateSeatState3(@RequestParam("orderNo")String orderNo);

    @PostMapping(path = "/scheduler/timeOutUpdateStart")
    @ApiOperation(value = "排期座位",notes = "订单超时取消座位状态锁定")
    boolean timeOutUpdateStart(@RequestParam("orderNo")String orderNo);

}
